Coder Social home page Coder Social logo

distcalc's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m Emiliano Firmino (Miliox)
  • ๐Ÿ‘€ Iโ€™m interested in low level programming, emulators, and operation systems.
  • ๐ŸŒฑ Iโ€™m currently learning rust, and safety programming.
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on projects that match my interests.
  • ๐Ÿ“ซ How to reach me over Twitter @EmilianoFirmino.

distcalc's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

xsery

distcalc's Issues

Evaluate natural math expression

Process a string containing a math expression wrote in infix notation with support to +,-,*,/ and parentheses; number are integers.

  • Tokenize string to identify numbers, operators and ignore white spaces
  • Convert infix notation to postfix notation
  • Evaluate postfix notation
  • Show result on screen
  • Support unary operation for positive and negative number at start of expression

Example:
expression "-1 + 3 - 2 * (2 + 3)" evaluated to -8

Remote calculate a math expression

Change echo client-server application to remote calculator application.

  • Pass math expression as argument
  • Implement server side of remote calculator protocol
  • Implement client side of remote calculator protocol
  • Handle connection issues and expression errors
  • Show result of evaluated expression

Distributed calculator operation

Change local binary operation evaluation (addition, subtraction, multiplication and division) to remote calls to operator evaluator server via calculator-evaluator protocol.

  • Load available operators protocol YAML file
  • Implement Calculator-Evaluator protocol on Calculator Server
  • Implement Calculator-Evaluator protocol on Evaluator Server
  • Handle connection errors, math errors and timeout
  • Replace local operator evaluation by remote operator evaluation

Launch calculator client via command line

Replace interpreter api by command line api as Specified in README.

  • Use a 3rd party library to handle command line
  • Validate arguments
  • Support pass math expression using stdin
  • Use default argument when undefined
  • Show usage when have no arguments
  • Show result or errors

Launch calculator server via command line

Replace interpreter api by command line api as specified in README.

  • Use same library of client cli
  • Validate arguments
  • Support pass configuration file by stdin
  • Use default argument when undefined
  • Show usage when have no arguments
  • Print trace information when on verbose mode

Launch operation evaluator via command line

Replace interpreter api by command line api as specified in README.

  • Use same library of client cli
  • Validate arguments
  • Use default argument when undefined
  • Show usage when have no arguments
  • Print trace information when on verbose mode

Echo tcp server and client

Write in ruby a client-server echo application.

Client:

  • Open a tcp client connection
  • Send a string to server
  • Wait for response
  • Print result on screen

Server:

  • Listen for tcp connection
  • Accept connection
  • Launch a worker to handle accepted connection
  • Receive tcp packet from client
  • Send received packets to client

All process should be logged using a 3rd party logging library to support verbose mode.

Specification of operation evaluator protocol

Define communication protocol between remote calculator and operation evaluator that process binary operation (add,subtraction,multiplication and division).

  • Yaml encoded
  • Support Math errors (Division by zero, Overflow, Underflow)
  • Transfer Operands and Result
  • Check requested operation is supported on server
  • Request Header
  • Request Content
  • Response Header
  • Response Content
  • Validate content using checksum
  • Content length in header

Specification of remote calculator protocol

Write specification of remote calculator used on communication between client and server distcalc applications.

Specification must contains:

  • request header format spec.
  • request content format spec.
  • response header format spec
  • response content format spec.
  • notify error or success in expression evaluation
  • support error description
  • guarantee integrity of content using checksum
  • support content length to avoid buffer error
  • use YAML to content encoding

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.