Server-to-Server PHP script

Closed

I have two servers (remote from each other), each one of the servers is running Apache, PHP and MySQL.

The first server I call an "Edge server", which serves requests from end-users via Apache, while the second server I call a "Back-end server", which serves requests from the Edge server via Apache.

I would like you to implement communication routines between the two remote servers, while the Edge queries the Back-end for database records, then the Edge caches the results, and reponds to the end-user. Which means, before it actually queries the Back-end, it must query its own local cache.

For implementing these routines, use a "user" record of the following fields:

User name (string)

Password - as hash (string)

First name (string)

Last name (string)

On the edge server, implement a function in PHP to look up a user's information given a user name. It should:

1. Check the local cache in the local mysql server for the user's record.

2. If the info is not cached, make a call to the back-end to get the record.

3. Populate the local cache with the returned info, and respond.

On the edge server, implement a function to modify a user record. This function will just make a call to the back-end

to update the user's information.

On the edge's web server, make a couple of PHP/HTML pages to test the user lookup and modify functions.

On the back-end server make a function to look up a user's information. This function should:

1. Look up the information in the database.

2. Return the info to the edge server.

A second function on the back-end should modify a user's information. It should:

1. Update the information in the database.

####

Edge Server

-----------

Implement the following in PHP:

UserRecord

{

string username;

string pwd_hash;

string firstname;

string lastname;

}

UserRecord lookup_user( string username )

{

// check cache. if not cached

// make call to back-end to get

// record. populate cache.

}

void modify_user( UserRecord rec )

{

// make call to back-end to update

// record.

}

In PHP/HTML make pages to call these functions:

1. Page to look up a given user.

2. Page to modify a user record.

####

Back-end Server

---------------

Implement the following in PHP:

UserRecord lookup_user( string username )

{

// called by edge server. Look up

// info in the database and respond.

}

void modify_user( UserRecord rec )

{

// update info in database.

}

Skills: MySQL, PHP

See more: string hash, php string to html, local edge, hash string, back end server, web server apache, rec, apache web server, apache php, php script last, web server php, function check php, mysql function update, apache test page html, php lookup, mysql update function, php cache, php script function, apache test page, record lookup, cache apache mysql, mysql lookup function, cache mysql, return query database php, php lookup function

About the Employer:
( 55 reviews ) Zihron Ya'akov, Israel

Project ID: #4651290

18 freelancers are bidding on average $192 for this job

omtechnologies

Hi! Our PHP Experts can do this project for you professionally. Please check PMB for details.

$257 USD in 5 days
(157 Reviews)
7.4
khanhhuyna

I can do this. Suggest to build REST API to make community between these 2 servers. Thanks.

$333 USD in 4 days
(79 Reviews)
6.4
frkSuna

I can do it. Please check PMB

$211 USD in 3 days
(112 Reviews)
6.0
wsfreelanzer

HI, i reviewed your requirement. I can do this project and will be completed in one day. Thanks, Raj

$166 USD in 0 days
(46 Reviews)
5.9
Eswar87

Hi Bronbbar, I have gone through the requirement. I can finish the task in 1 day and start right away. Thank you, Regards, Eswar

$144 USD in 1 day
(36 Reviews)
5.8
intelgeek

Great PHP Skills

$166 USD in 5 days
(117 Reviews)
5.7
Predte4a

Hi, please check your PM. Thanks.

$200 USD in 3 days
(13 Reviews)
5.6
nuprogramer

Please check Pm for details.

$368 USD in 7 days
(22 Reviews)
5.5
engrjahed

Dear Sir, Please check my PM

$184 USD in 3 days
(23 Reviews)
5.2
rajibdebslg

Hi! I am very interested in this project. Please see PMB for more details. Thanks, Rajib

$131 USD in 7 days
(41 Reviews)
5.1
farhaoui

Hi, we are a team of programmers and designers with expertise and experience in PHP, Mysql, jQuery and Ajax. We have coded and designed websites for various types of businesses very successfully. We have developed many More

$144 USD in 3 days
(47 Reviews)
5.0
iosifpeterfi

Hello sir, I'll be honored to work on this project as well. Please check PM. Regards, Iosif

$105 USD in 3 days
(14 Reviews)
4.9
arickbro

please check PM for more detail

$155 USD in 3 days
(10 Reviews)
4.7
kese

i'm ready let's do it

$100 USD in 3 days
(5 Reviews)
2.2
sushant003

Dear Employer, Expert for the same. Thanks PVsys Group

$263 USD in 12 days
(3 Reviews)
2.1
tigerCoder

Hi, Hope my expertise level will help you in this project. Regards

$94 USD in 5 days
(3 Reviews)
2.0
cryons

Hello, Please check your PMB. Thanks have a awesome day

$257 USD in 3 days
(3 Reviews)
1.5
steelmans1980

It looks straight forward. edge server acts as proxy for back-end, and creates redundancy by updating its own db. communication between servers can use PHP REST API and edge server would use CURL in php to issue the RE More

$75 USD in 3 days
(1 Review)
1.0
jcm112388

I can easily complete this for you. I know exactly what you need done. I use caching all the time at my current job. (I am a Senior Software Engineer for a VERY high traffic website, we have millions of users daily and More

$250 USD in 1 day
(0 Reviews)
0.0