Thursday, May 21, 2015

Second Experience With GitHub

Well, my first experience is downloading a repository from GitHub with pure git command.

The second one, I was trying to use tools provided by GitHub to interact with GitHub.

1. Created a repository called MonitorService on GitHub under my account.
2. With Git Shell, in the working directory, I executed git init to make a local repository
3. In GitHub, I added the local repository and configured the remote repository's URL. then it failed while I tried to publish to remote after putting changes into staging area.
4. web suggested to use git push, it failed but prompted to pull the first since there's already something there while the repository was generated, a readme file in my case.
5. so these resolved the problem

git pull origin master
git push --set-upstream origin master

now back to GitHub, status became sync instead of publish.

Glad to have this failed experience. I am pretty naive on git still.

But if you are interested, the content is a piece of work I spent 13 hours on to fulfill a technical assignment in a job interview. It is a monitoring service that monitors if a TCP/IP based service is up or down. It's a small work, but it has its own network protocol and it provides basic functions for you to
--define a service
--subscribe a service
--set polling period for individual subscriber, meaning each subscriber can have different polling frequency
--schedule outage period
--list registered service
--quit connection
--shutdown the monitor service from client

For learning purpose, it demonstrates observer design pattern, TCP/IP programming and unit testing. So it is a nice example to check how a server looks like.

The GitHub repository is located at

https://github.com/shijiema/MonitorService

No comments: