Giter VIP home page Giter VIP logo

illumio-coding-assignment-2018-pce-teams's Introduction

Illumio-Coding-Assignment-2018-PCE-teams

Approach:

  • I have created 4 separate objects for 'inbound-tcp', 'inbound-udp', 'outbound-tcp' and 'outbound-udp'. Each object has their separate port-ip mapping maintained using HashMap.

  • As I know, the max number of ports in case of tcp and udp is 65K. This is not a very large number to store. Hence I am storing all the incoming ports along with ip_addresses associated to it.

  • As I directly have access to ports associated to 4 defined objects, all that searching process happens in O(1), but the main task is searching ip_address.

  • Due to time constraint I could not implement any better solution. I went with linear search. I have stored the ip addresses (range) associated with a port in a HashSet. First I do contains call, if it is present then no need to go further, time complexity is O(1). This is the best case, where entire search happens in O(1).

  • But when contains call return false. I do linear search, going over each range and looking whether it contains input ip_address. The time complexity is O(number of ip ranges associated to port). Please pay attention here, I am not storing each ip address from the range, I am just storing the range. Hence size doesn't exceed.

  • I would have implemented a better approach if I had time.

Testing

  • I tested the code by giving test_firewall.csv as an input which contain inputs as well as expected output. If code output and expected output matches for all testcases then the message come 'All test cases passed successfully!!!!', else the code breaks, printing the failing test case.

Policy team

  • In my current semester, I am working on partition tolerance and eventual consistency in MongoDB, Redis caching, Vector Stamps. I am implementing all these features in my project. All these things closely match with what policy team is doing. I think, I will learn a lot if given a chance.

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.